package net.llz.service;

import net.llz.dto.VideoOrderDto;
import net.llz.model.VideoOrderDO;

import java.util.List;

public interface VideoOrderService {

    /**
     * 保存订单
     * @param videoOrderDto
     * @return
     */
    String  saveVideoOrder(VideoOrderDto videoOrderDto) throws Exception;

    /**
     * 根据id查找订单
     * @param id
     * @return
     */
    VideoOrderDO findById(int id);

    /**
     * 根据流水号查
     * @param outTradeNo
     * @return
     */
    VideoOrderDO findByOutTradeNo(String outTradeNo);

    /**
     * 根据订单流水号更新
     * @param videoOrderDO
     * @return
     */
    int updateVideoOderByOutTradeNo(VideoOrderDO videoOrderDO);


    /**
     * 根据逻辑删除id
     * @param id
     * @return
     */
    int del(int id);

    /**
     * 根据用户id查找订单
     * @param userId
     * @return
     */
    List<VideoOrderDO> findMyOrderList(int userId);




}
